using System;
using System.Data;

using Wicresoft.Common;

namespace Wicresoft.Busi.Entity
{
	[Table("MeetingRoomApplyGoods", "", "Busi.ConnectionString")]
	public class MeetingRoomApplyGoods : Info
	{
		#region SQL column name consts 
		public const string SQLCOL_APPLYID = "ApplyID";
		public const string SQLCOL_GOODSID = "GoodsID";
		public const string SQLCOL_ISNEED = "IsNeed";
		public const string SQLCOL_GOODSCOUNT = "GoodsCount";
		public const string SQLCOL_GOODSTYPE = "GoodsType";
		public const string SQLCOL_COMMENT = "Comment";
		#endregion


		#region Contructors
		/// <summary>
		/// Construct empty entity
		/// </summary>
		public MeetingRoomApplyGoods () {}

		/// <summary>
		/// Construct entity by primary key, other fields will be assigned by 
		/// "Load" method.
		/// </summary>
		public MeetingRoomApplyGoods (int ApplyID, int GoodsID)
		{
			this.ApplyID = ApplyID;
			this.GoodsID = GoodsID;
		}
		#endregion

		public override void Init (DataRow row)
		{
			ApplyID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_APPLYID]);
			GoodsID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_GOODSID]);
			IsNeed = (bool)ObjectType.BooleanTypeHelper.Read(row[SQLCOL_ISNEED]);
			GoodsCount = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_GOODSCOUNT]);
			GoodsType = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_GOODSTYPE]);
			Comment = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_COMMENT]);
		}

		#region Properties 
		#region Property <int> ApplyID
		[Property("ApplyID", 4, SqlDbType.Int, false, true)]
		public int ApplyID 
		{
			get { return _ApplyID; }
			set { _ApplyID = value; }
		}
		private int _ApplyID = int.MinValue;
		#endregion

		#region Property <int> GoodsID
		[Property("GoodsID", 4, SqlDbType.Int, false, true)]
		public int GoodsID 
		{
			get { return _GoodsID; }
			set { _GoodsID = value; }
		}
		private int _GoodsID = int.MinValue;
		#endregion

		#region Property <bool> IsNeed
		[Property("IsNeed", 1, SqlDbType.Bit, false, false)]
		public bool IsNeed 
		{
			get { return _IsNeed; }
			set { _IsNeed = value; }
		}
		private bool _IsNeed = false;
		#endregion

		#region Property <int> GoodsCount
		[Property("GoodsCount", 4, SqlDbType.Int, false, false)]
		public int GoodsCount 
		{
			get { return _GoodsCount; }
			set { _GoodsCount = value; }
		}
		private int _GoodsCount = int.MinValue;
		#endregion

		#region Property <string> GoodsType
		[Property("GoodsType", 200, SqlDbType.NVarChar, false, false)]
		public string GoodsType 
		{
			get { return _GoodsType; }
			set { _GoodsType = value; }
		}
		private string _GoodsType = null;
		#endregion

		#region Property <string> Comment
		[Property("Comment", 1000, SqlDbType.NVarChar, false, false)]
		public string Comment 
		{
			get { return _Comment; }
			set { _Comment = value; }
		}
		private string _Comment = null;
		#endregion
		#endregion




	}
}
